/**  
  -- The Performance Driven Lime Project -- 

  A self adaptive tuple space for mobile agents and hosts by dynamic
  adapting tuple's replication policy.
  
  Copyright (C) 2008
  Xing Jiankuan, Pan Wenhui
  SAGroup of Tsinghua University

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  Lesser General Public License for more details.

  You should have received this copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
 */
package sagroup.dracots.commands;

import lime2.Location;
import sagroup.dracots.Field;
import sagroup.dracots.ShareTuple;
import sagroup.dracots.SignalTuple;
import sagroup.dracots.SystemTupleType;

/**
 * Push command will automatically push replicas to some hosts if they declare
 * "Full Replication" policy when matched tuple is written. The update link is
 * also created by this command's initiator.
 * 
 * @author Xing Jiankuan
 * 
 */
public class PushCommand extends SignalTuple {

	private static final long serialVersionUID = 700955194264560660L;
	
	@Field
	private ShareTuple[] tuples;
	
	public ShareTuple[] getTuples() {
		return tuples;
	}
	
	public PushCommand() {
		
	}

	public PushCommand(ShareTuple[] tuples, Location dest) {
		super(SystemTupleType.COMMAND, dest);
		this.tuples = tuples;
	}
}
